<%--
  Created by IntelliJ IDEA.
  User: willy
  Date: 2022/4/20
  Time: 21:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.List,com.data.HitCourse" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core_1_1" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>课程信息</title>
    <style>

        table{
            border: 1px black solid;
            width: 600px;
            border-collapse: collapse;
        }
        td,tr,th{
            border: 1px black solid;
        }

    </style>
</head>
<body>

    <%
    List<HitCourse> courses = (List<HitCourse>)request.getSession().getAttribute("Hitresult");
    request.getSession().setAttribute("uId",courses.get(0).getuId());
%>
    <p>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    学号：<u><%=courses.get(0).getuId()%></u>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    姓名：<u><%=courses.get(0).getuName()%></u>
    </p>
    <form action="CourseController" method="post">
<table>

    <tr align="center">
        <th></th>
        <th>序号</th>
        <th>课程名称</th>
        <th>分数</th>

    </tr>

    <%for (HitCourse hitcourse : courses) {%>

    <tr align="center">
        <td><input type="checkbox" name="hitchoose" value="<%=hitcourse.getcId()%>"/></td>
        <td><%=hitcourse.getcId()%></td>
        <td><%=hitcourse.getcName()%></td>
        <td><%=hitcourse.getScore()%></td>
    </tr>

    <% } %>
</table>
    <p>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <%request.getSession().setAttribute("hitcourse","delete");
            request.getSession().setAttribute("course","");%>
    <input type="submit" value="退选" >
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;


        <input type="button" value="课程管理" onclick="window.location.href='/Homework-920106840130/allCourse.jsp'">
    </p>
    </form>
</body>
</html>